<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        var a = prompt("输入狗的nianl");
     if (isNaN(a) || a<0){
         while (isNaN(a) || a<0){
             alert("你输入的有错误");

             a = prompt("输入狗的nianl");

         }

     }else if (a<=2){

         alert("adasdasdasd")



     }
   /*

                     var q =1000;

                        var n =0;
                  while (q <= 5000){
                      q = q * 1.05;
                      n++;
                           }
                        alert(n);

*/

    </script>
</head>
<body>

</body>
</html>